package com.itheima.health.dao;


import com.itheima.health.pojo.Member;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestBody;

/**
 *会员Dao
 */
@Mapper
public interface MemberDao {

    /**
     * 根据手机号查询
     * @param phoneNumber
     * @return
     */
    Member selectByPhoneNumber(@Param("phoneNumber") String phoneNumber);


    /**
     * 根据id更新非空字段
     * @param member
     */
    void updateByIdSelective(Member member);

    /**
     * 插入
     * @param member
     */

    void insert(@RequestBody Member member);


    /**
     * 根据id查询
     * @param id
     * @return
     */
    Member selectById(@Param("id") Integer id);



    Long countByRegTime(String endDate);

}
